{% extends "base.html" %}

{% block content %}

    {% if password_is_wrong %}  
        <div class="alert alert-danger">  
            <button type="button" class="close" data-dismiss="alert">×</button>  
            <h4>{{ _(u"错误!") }}</h4>{{ _(u"用户名或密码错误") }}   
        </div>  
    {% end %}
    {% if name_or_pws_is_none %}  
        <div class="alert alert-danger">  
            <button type="button" class="close" data-dismiss="alert">×</button>  
            <h4>{{ _(u"警告!") }} </h4>{{ _(u"请输入用户名和密码") }}
        </div>  
    {% end %}
    <div class="block row">
        <div class="col-xs-8 col-xs-offset-2">
            <h2><p class="text-center text-uppercase">{{ handler.settings['title'] }}</p></h2>
            <form class="form-horizontal" action="/login" method="post">  
                {% raw xsrf_form_html() %} 
                
                <div class="form-group">
                    <label for="username">{{ _(u"用户名") }}</label>
                    <input class="form-control" id="username" name="username"  placeholder="Username" />                    
                </div>
                <div class="form-group">
                    <label for="password">{{ _(u"密码") }}</label>
                    <input type="password" class="form-control" id="passowrd" name="password" placeholder="Password" />    
                </div>                
                
                <hr>
                <p class="form-actions">  
                    
                </p>  
                <div class="form-group">
                    <div class="col-xs-offset-2 col-xs-10">
                      <input type="submit" value="{{ _(u'登录') }}" class="btn btn-primary pull-right" />
                    </div>
                </div>
            </form>
        </div>
    </div>  

{% end %}
